#ifndef   GAME_DISPLAY_HY
#define   GAME_DISPLAY_HY

#include "windows.h"


class CDisplay
{
private:
	int m_mempitch;
	unsigned char *m_screenBuffer;
	unsigned char *m_backBuffer;
	int m_screenWidth;
	int m_screenHeight;
	int m_colorDepth;
	int m_clip[4];
	HWND m_hMainwnd;
	HBITMAP m_hbmp;
	HDC m_memoryDC;	
	BITMAPINFO m_b;

	void Initialize();

public:
	CDisplay();
	~CDisplay();
	void Open();
	void Close();
	void SetWndHandle(HWND hMainwnd);
	int SetDisplayMode();
	void SetClip(int x, int y, int width, int height);
	void GetClip(int *x, int *y, int *width, int *height);
	int GetScreenWidth();
	int GetScreenHeight();
	int GetNativeColorDepth();
	void LockSurface();
	void UnLockSurface();
	unsigned char *GetVideoBuffer();
	int GetPitch();
	void FlashtoScreen();
};

#endif
